<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="se" uri="http://www.springframework.org/security/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<style type="text/css">
body{margin: 0 auto;}
</style>
</head>
<body>
<se:authentication property="principal.username" var="username"/>
${username} ：您好，欢迎来到本页面！
<se:authorize access="hasRole('ROLE_ADMIN')">
你好，管理员！<br>
<a href="/admin/gotoBasicInfo">进入管理员界面</a>
</se:authorize>
<se:authorize access="hasRole('ROLE_USER')">
你好，用户！<br>
<a href="/user/gotoBasicInfo">进入用户界面</a>
</se:authorize>
<div>
<ul> 
       <c:url var="logoutUrl" value="/logout"/> 
       <li>
           <a 
                   href="${logoutUrl}">Logout</a>
       </li>
</ul>
</div>
</body>
</html>